﻿@model IEnumerable<KRM.Core.tblProductSupportEmailTemplate>
@{
    ViewBag.Title = "Email Template";
    Layout = "~/Views/Shared/_Layout.cshtml";
}

<div class="container-fluid">
    <div class="box">
        <div class="box-title">
            <h3><i class="icon-tasks"></i>Email Template</h3>
        </div>

        <div class="box-content">
                <div class="row-fluid">
                    <div class="span3">
                        <a href="/ticket/emailtemplateitem/0" class="btn btn-success" style="margin-bottom: 20px"><i class="icon-edit"></i>Add new template</a>
                    </div>
                </div>
            @Html.Partial("Partial/_MessageResult")
            <table class="table table-hover table-bordered table-fix">
                <thead>
                    <tr>
                        <th style="text-align: center">ID</th>
                        <th>Name</th>
                        <th style="text-align: center">Action</th>
                    </tr>
                </thead>
                <tbody>
                    @foreach (var item in Model)
                    {
                        <tr>
                            <td style="text-align: center">@item.TemplateID</td>
                            <td>@item.TemplateName</td>
                            <td style="text-align: center">
                                <a href="/ticket/emailtemplateitem/@item.TemplateID" title="Edit: @item.TemplateName" class="btn btn-primary">Edit</a>
                                <a href="/ticket/deletetemplate/@item.TemplateID" title="Delete: @item.TemplateName" class="btn btn-danger" 
                                   onclick="return confirm('Are you sure?')">Delete</a>
                            </td>
                        </tr>
                    }
                </tbody>
            </table>
        </div>
    </div>
</div>

